package ldy.es.domain;

import ldy.es.constant.IndexConstant;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.List;

/**
 * 包名. ldy.es.domain
 * Copyright tiens. All Rights Reserved.
 * 描述详情：商机 domain对象
 * 创建者：liudy
 * 创建时间：2018/4/1-16:20.
 */
@Document(indexName =IndexConstant.ES_INDEX_NAME_OPPORTUNITY,
        type = IndexConstant.ES_INDEX_TYPE_NAME_OPPORTUNITY,replicas = 0
)
public class Opportunity implements Serializable{
    @Id
    private String opp_id;

    @Field(type = FieldType.Date,format = DateFormat.year_month_day)
    private String add_date;

    @Field(type = FieldType.text)
    private String opp_name;


    @Field(type = FieldType.Long)
    private List<Long> tagList;

    @Field(type = FieldType.keyword,index = false)
    private  List<String> tagCNList;

    public String getOpp_id() {
        return opp_id;
    }

    public void setOpp_id(String opp_id) {
        this.opp_id = opp_id;
    }

    public String getAdd_date() {
        return add_date;
    }

    public void setAdd_date(String add_date) {
        this.add_date = add_date;
    }

    public String getOpp_name() {
        return opp_name;
    }

    public void setOpp_name(String opp_name) {
        this.opp_name = opp_name;
    }

    public List<Long> getTagList() {
        return tagList;
    }

    public void setTagList(List<Long> tagList) {
        this.tagList = tagList;
    }

    public List<String> getTagCNList() {
        return tagCNList;
    }

    public void setTagCNList(List<String> tagCNList) {
        this.tagCNList = tagCNList;
    }

}
